02c7abdec3c042770fae63671c96bec748d45ccd,cdap-hbase-compat-0.96/src/main/java/co/cask/cdap/data2/increment/hbase96/IncrementHandler.java,IncrementHandler,getCompactionBound,#Store#,228
Before Change
private long getCompactionBound(Store store) {
long compationBound;
CompactionBound bound = compactionBoundByFamily.get(store.getFamily().getName());
if (CompactionBound.UNLIMITED == bound) {
compationBound = HConstants.LATEST_TIMESTAMP;
} else if (CompactionBound.TX_UPPER_VISIBILITY_BOUND == bound) {
TransactionSnapshot snapshot = cache.getLatestState();
// if tx snapshot is not available, used "0" as upper bound to avoid trashing in-progress tx
compationBound = snapshot != null ? snapshot.getVisibilityUpperBound() : 0;
} else {
// do not compact anything, if it is not clear what to do (safest approach)
compationBound = 0;
}
return compationBound;
}
}
After Change
}
private long getCompactionBound(Store store) {
if (txnlFamilies.contains(store.getFamily().getName())) {
TransactionSnapshot snapshot = cache.getLatestState();
// if tx snapshot is not available, used "0" as upper bound to avoid trashing in-progress tx
return snapshot != null ? snapshot.getVisibilityUpperBound() : 0;
} else {
return HConstants.LATEST_TIMESTAMP;
}
}
}